package com.example.date;

import java.time.DayOfWeek;
import java.time.LocalDate;
import java.time.temporal.WeekFields;

/**
 * @author hej
 * @date 2023/9/8 14:20
 */
public class DateYY {
    public static void main(String[] args) {
        //获取年
        System.out.println(LocalDate.now().getYear() % 100);
        WeekFields weekFields = WeekFields.of(DayOfWeek.SUNDAY,1);
        System.out.println(LocalDate.of(2023, 9, 17).get(weekFields.weekOfYear()));
    }
}
